﻿using System.Windows;
using System.Windows.Data;

namespace ValidationFramework.WPF
{
	/// <summary>
	/// Defined how to display error for <see cref="FrameworkElement"/>s.
	/// </summary>
    public interface IErrorDisplayStrategy : IStrategy<FrameworkElement>
	{
		/// <summary>
		/// Displays the error message on a given <see cref="FrameworkElement"/>.
		/// </summary>
		/// <param name="bindingExpressionBase">The <see cref="BindingExpressionBase"/> that has caused the error.</param>
		/// <param name="frameworkElement">The <see cref="FrameworkElement"/> to display the error on.</param>
		/// <param name="errorMessage">The error message to display.</param>
		void DisplayError(BindingExpressionBase bindingExpressionBase, FrameworkElement frameworkElement, string errorMessage);

		/// <summary>
		/// Clears any error messages on an <see cref="FrameworkElement"/>.
		/// </summary>
		/// <param name="element">The <see cref="FrameworkElement"/> to clear any error messages for.</param>
		void ClearError(FrameworkElement element);
	}

}
